﻿using System.Threading.Tasks;
using Abp.Application.Services;
using FutureApp.Roles.Dto;
using Abp.Application.Services.Dto;

namespace FutureApp.Roles
{
    /// <summary>
    /// 角色组应用服务
    /// </summary>
    public interface IRoleAppService : IApplicationService
    {
        /// <summary>
        /// 更新角色组权限
        /// </summary>
        /// <param name="input">参数</param>
        Task UpdateRolePermissions(UpdateRolePermissionsInputDto input);

        /// <summary>
        /// 获取角色组权限
        /// </summary>
        /// <param name="input">参数</param>
        Task<GetRolePermissionsOutput> GetRolePermissions(GetRolePermissionsInput input);

        /// <summary>
        /// 更新角色组用户
        /// </summary>
        /// <param name="input">参数</param>
        void UpdateRoleUsers(UpdateRoleUsersInputDto input);

        /// <summary>
        /// 获取角色组用户
        /// </summary>
        /// <param name="input">参数</param>
        Task<GetRoleUsersOutput> GetRoleUsers(GetRoleUsersInput input);

        /// <summary>
        /// 获取角色组列表
        /// </summary>
        /// <returns>角色组列表</returns>
        ListResultDto<RoleEntityDto> GetRoles();

        /// <summary>
        /// 通过id获取角色组
        /// </summary>
        /// <param name="id">角色组id</param>
        /// <returns>角色</returns>
        Task<RoleEntityDto> GetRoleById(int id);

        /// <summary>
        /// 创建角色组
        /// </summary>
        /// <param name="input">参数</param>
        Task CreateRole(CreateRoleInput input);

        /// <summary>
        /// 修改角色组
        /// </summary>
        /// <param name="input">参数</param>
        Task UpdateRole(UpdateRoleInput input);

        /// <summary>
        /// 删除角色组
        /// </summary>
        /// <param name="id">角色组id</param>
        Task DeleteRole(int id);
    }
}
